﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<form action="saveGoodsType.php" method="post">
			商品编号：<input id="typeId" type="text" name="typeId" /><br/>
			商品类型：<input type="text" name="goodsType" /><br/>
			<input type="submit" value="保存" />
		</form>
	</body>
</html>
<script src="js/jquery-3.2.1.min.js"></script>
<script>

$(function(){
    $.get('getMaxTypeId.php',function(data){
        let maxTypeId = "001";
        if(data!=""){
            let str = "00"+(parseInt(data)+1);
            maxTypeId = str.substr(str.length-3,3);
        }
        $("#typeId").val(maxTypeId);
    });

});
</script>
